package cn.chainco.cts.jdo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * cts用户表
 */
@Entity
@Table(name = "cts_user")
public class User implements Serializable {

	private static final long serialVersionUID = -8475095826892953708L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private long id;

	@Column(unique = true, nullable = false, length = 50)
	private String userName; // cts帐号，邮件地址

	@Column(nullable = false, length = 32)
	private String userPass; // 密码

	@Column(length = 50)
	private String logoPath; // LOGO路径

	@Temporal(TemporalType.TIMESTAMP)
	@Column(updatable = false)
	private Date createTime; // 创建日期

	@Column
	private Integer status = 0; // 用户状态：0正常；1禁用；2临时
	
	@Column(length = 32)
	private String findCode; // 验证码（找回密码）

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPass() {
		return userPass;
	}

	public void setUserPass(String userPass) {
		this.userPass = userPass;
	}

	public String getLogoPath() {
		return logoPath;
	}

	public void setLogoPath(String logoPath) {
		this.logoPath = logoPath;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getFindCode() {
		return findCode;
	}

	public void setFindCode(String findCode) {
		this.findCode = findCode;
	}

}
